import scrapy



from ..items import VideobarrageItem

class BarragespiderSpider(scrapy.Spider):
    name = 'barragespider'
    allowed_domains = ['bilibili.com']
    start_urls = ['http://comment.bilibili.com/311950125.xml']


    def parse(self, response):
        items = VideobarrageItem()
        danmus = response.xpath("//d/text()").extract()
        for danmu in danmus:
            items['content'] = danmu
            print(items)
            # yield items
